import React from 'react';
import {useNavigate} from "react-router-dom";

function News(props) {
    const navigate = useNavigate()
    return (
        <div>
            <h3>新闻列表</h3>
            <button onClick={()=>navigate({pathname:'/'},{state:{a:33,b:44}})}>点击跳转至首页</button>
        </div>
    );
}

export default News;